<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>应急消防在线巡更系统</title>

    <script type="text/javascript" src="js/jquery-1.4.2.js"></script>

    <script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jquery.min.js"></script>


    <script type="text/javascript">
        $(document).ready(function(){
            $("#nav li").hover(function(){
                $(this).find("ul").slideDown("slow");
            },function(){
                $(this).find("ul").slideUp("fast");
            });
        });
    </script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=E06eb9d756d0eafc722effb355657b4c"></script>
    <!-- 加载鼠标绘制样式 -->
    <link rel="stylesheet" href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css">
    <style>
        html,
        body {
            width: 100%;
            height: 100vh;
            padding: 0;
            margin: 0;
            overflow: hidden;
        }
        #container {
            overflow: hidden;
            width: 100%;
            height: 100%;
            margin: 0;
            font-family: "微软雅黑";
        }
        /* 隐藏百度地图logo */
        /*.anchorBL {*/
        /*  display: none;*/
        /*}*/

        .btn-contrail button {
            margin-bottom: 30px;
            margin-left: 0px!important;
            background-color: #FFFFFF;
            color: rgba(0, 0, 0, .5);
            padding: 10px;
        }

        .layui-btn:hover {
            background-color: #1890ff!important;
            color: #FFFFFF!important;
        }

        .btn-click {
            background-color: #1890ff!important;
            color: #FFFFFF!important;
        }

        .BMapLib_Drawing {
            position: absolute!important;
            right: 150px!important;
            display: none;
        }
        /* 隐藏工具栏 */
        .BMapLib_marker {
            display: none;
        }
    </style>
</head>
<script src="http://c.cnzz.com/core.php"></script>
<style>
    html {
        font-family: 'Lato', sans-serif;
        font-size: 20px;
    }

    main {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        height: 100vh;
    }

    input.hamburger {
        display: none;
    }
    input.hamburger:checked ~ label > i {
        background-color: transparent;
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
    input.hamburger:checked ~ label > i:before {
        -webkit-transform: translate(-50%, -50%) rotate(315deg);
        transform: translate(-50%, -50%) rotate(315deg);
    }
    input.hamburger:checked ~ label > i:after {
        -webkit-transform: translate(-50%, -50%) rotate(-315deg);
        transform: translate(-50%, -50%) rotate(-315deg);
    }
    input.hamburger:checked ~ label close {
        color: #222;
        width: 100%;
    }
    input.hamburger:checked ~ label open {
        color: rgba(0, 0, 0, 0);
        width: 0;
    }

    label.hamburger {
        z-index: 9999;
        position: relative;
        display: block;
        height: 50px;
        width: 50px;
    }
    label.hamburger:hover {
        cursor: pointer;
    }
    label.hamburger text close,
    label.hamburger text open {
        text-transform: uppercase;
        font-size: .8em;
        align-text: center;
        position: absolute;
        -webkit-transform: translateY(50px);
        transform: translateY(50px);
        text-align: center;
        overflow: hidden;
        -webkit-transition: width .25s .35s, color .45s .35s;
        transition: width .25s .35s, color .45s .35s;
    }
    label.hamburger text close {
        color: rgba(0, 0, 0, 0);
        right: 0;
        width: 0;
    }
    label.hamburger text open {
        color: #222;
        width: 100%;
    }
    label.hamburger > i {
        position: absolute;
        width: 100%;
        height: 2px;
        top: 50%;
        background-color: #222;
        pointer-events: auto;
        -webkit-transition-duration: .35s;
        transition-duration: .35s;
        -webkit-transition-delay: .35s;
        transition-delay: .35s;
    }
    label.hamburger > i:before, label.hamburger > i:after {
        position: absolute;
        display: block;
        width: 100%;
        height: 2px;
        left: 50%;
        background-color: #222;
        content: "";
        -webkit-transition: -webkit-transform 0.35s;
        transition: -webkit-transform 0.35s;
        transition: transform 0.35s;
        transition: transform 0.35s, -webkit-transform 0.35s;
        -webkit-transform-origin: 50% 50%;
        transform-origin: 50% 50%;
    }
    label.hamburger > i:before {
        -webkit-transform: translate(-50%, -14px);
        transform: translate(-50%, -14px);
    }
    label.hamburger > i:after {
        -webkit-transform: translate(-50%, 14px);
        transform: translate(-50%, 14px);
    }

    html {
        font-family: 'Roboto', sans-serif;
    }

    body {
        margin: 0;
        overflow-x: hidden;
        height: 100vh;
        width: 100vw;
    }

    ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .primnav li:hover, .primnav expand:hover {
        background-color: #e0d2bc;
        background-color:  rgb(253, 105, 7);
    }

    .primnav {
        position: fixed;
        height: 58px;
        width: 100vw;
        font-size: .8em;
        text-transform: uppercase;
        background-color: rgb(7, 7, 5);
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-transition: height 246ms .5s ease;
        transition: height 246ms .5s ease;
        padding-top: 58px;
        overflow-x: hidden;
        overflow-y: hidden;
        border-top: 1px solid rgba(255, 255, 255, 0.8);
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        z-index: 1;
    }
    @media (min-width: 650px) {
        .primnav {
            height: 100vh;
            width: 58px;
            -webkit-transition: width 246ms .5s ease;
            transition: width 246ms .5s ease;
        }
    }
    .primnav > ul {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .primnav li {
        font-weight: 400;
        position: relative;
    }
    .primnav li .tag {
        background-color: #f0f1f1;
        background-color: rgba(231, 238, 243, 0.8);
        color: rgba(255, 255, 255, 0.8);
        color: #e6e6e6;
        color: rgba(255, 255, 255, 0.9);
        padding: 0 .5em;
        border-radius: 2em;
        margin-left: auto;
        margin-right: .75em;
    }
    .primnav li a {
        position: relative;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        white-space: nowrap;
        color: white;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
    }
    .primnav .icon {
        height: 20px;
        -ms-flex-negative: 0;
        flex-shrink: 0;
        width: 20px;
        padding: 19px;
        margin-right: 5px;
        padding-bottom: 15px;
        color: #e6e6e6;
        color: rgba(255, 255, 255, 0.9);
    }

    .secnav {
        margin-left: 63px;
        border-left: 1px solid black;
        border-left-color: #d7dbdf;
        border-left-color: rgba(160, 169, 177, 0.9);
        overflow: hidden;
    }
    .secnav li {
        color: #e6e6e6;
        color: rgba(255, 255, 255, 0.9);
        max-height: 100px;
        -webkit-transition: max-height .1s;
        transition: max-height .1s;
    }
    @media (min-width: 650px) {
        .secnav li {
            max-height: 0px;
            -webkit-transition: max-height .5s .5s;
            transition: max-height .5s .5s;
        }
    }
    .secnav li a {
        text-transform: initial;
        display: block;
        color: inherit;
        padding: .75em 10px;
    }

    user {
        padding: 5px;
        padding-bottom: 3px;
        -ms-flex-negative: 0;
        flex-shrink: 0;
        position: fixed;
        font-weight: 400;
        right: 0;
        color: white;
        color: rgba(255, 255, 255, 0.9);
        z-index: 99999;
    }
    user > section {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: horizontal;
        -webkit-box-direction: reverse;
        -ms-flex-direction: row-reverse;
        flex-direction: row-reverse;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
    }
    user > section > section {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        white-space: nowrap;
    }
    user img {
        height: 51px;
        width: 48px;
        -webkit-clip-path: circle(50% at 50% 50%);
        clip-path: circle(50% at 50% 50%);
        margin-left: 10px;
        min-height: 51px;
        min-width: 48px;
        -webkit-box-align: end;
        -ms-flex-align: end;
        align-items: flex-end;
    }
    user name {
        font-weight: 400;
    }
    user actions {
        padding: .1em 0;
        font-size: .8em;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: end;
        -ms-flex-pack: end;
        justify-content: flex-end;
    }
    user actions a {
        padding: 0 .5em;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
    }
    user actions a:last-child {
        padding-right: 0;
    }

    content {
        font-family: 'Pacifico', cursive;
        color: rgba(255, 255, 255, 0.9);
        font-size: 8vw;
        letter-spacing: 1px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        background-color: white;
        height: 100%;
        padding-top: 58px;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        position: relative;
    }
    @media (min-width: 650px) {
        content {
            padding-left: 58px;
            padding-top: 0;
        }
    }

    .features {
        font-family: 'Lato', sans-serif;
        font-size: 1rem;
        text-transform: uppercase;
    }
    .features li {
        width: 100%;
        text-align: center;
        padding: .25em;
    }

    /**
        SCROLLBAR STYLE FOR IE
    */
    body {
        background-color: white;
    }

    .icon {
        display: inline-block;
        width: 5vw;
        height: 4vw;
        stroke-width: 0;
        stroke: currentColor;
        fill: currentColor;
    }

    /** hamburger */
    input.hamburger {
        display: none;
    }
    input.hamburger:checked ~ nav.primnav {
        height: 100vh;
    }
    @media (min-width: 650px) {
        input.hamburger:checked ~ nav.primnav {
            width: 275px;
        }
    }
    @media (min-width: 650px) {
        input.hamburger:checked ~ nav.primnav .secnav > li {
            max-height: 100px;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(1) {
            -webkit-transition: max-height 0.5s 0.67s ease-in;
            transition: max-height 0.5s 0.67s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(2) {
            -webkit-transition: max-height 0.5s 0.69s ease-in;
            transition: max-height 0.5s 0.69s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(3) {
            -webkit-transition: max-height 0.5s 0.71s ease-in;
            transition: max-height 0.5s 0.71s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(4) {
            -webkit-transition: max-height 0.5s 0.73s ease-in;
            transition: max-height 0.5s 0.73s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(5) {
            -webkit-transition: max-height 0.5s 0.75s ease-in;
            transition: max-height 0.5s 0.75s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(6) {
            -webkit-transition: max-height 0.5s 0.77s ease-in;
            transition: max-height 0.5s 0.77s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(7) {
            -webkit-transition: max-height 0.5s 0.79s ease-in;
            transition: max-height 0.5s 0.79s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(8) {
            -webkit-transition: max-height 0.5s 0.81s ease-in;
            transition: max-height 0.5s 0.81s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(9) {
            -webkit-transition: max-height 0.5s 0.83s ease-in;
            transition: max-height 0.5s 0.83s ease-in;
        }
        input.hamburger:checked ~ nav.primnav .secnav > li:nth-child(10) {
            -webkit-transition: max-height 0.5s 0.85s ease-in;
            transition: max-height 0.5s 0.85s ease-in;
        }
    }
    input.hamburger:checked ~ label > i {
        background-color: transparent;
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
    input.hamburger:checked ~ label > i:before {
        -webkit-transform: translate(-50%, -50%) rotate(315deg);
        transform: translate(-50%, -50%) rotate(315deg);
    }
    input.hamburger:checked ~ label > i:after {
        -webkit-transform: translate(-50%, -50%) rotate(-315deg);
        transform: translate(-50%, -50%) rotate(-315deg);
    }
    input.hamburger:checked ~ label close {
        color: rgba(255, 255, 255, 0.8);
        width: 100%;
    }
    input.hamburger:checked ~ label open {
        color: rgba(0, 0, 0, 0);
        width: 0;
    }

    label.hamburger {
        z-index: 9999;
        position: relative;
        display: block;
        height: 24px;
        width: 24px;
    }
    label.hamburger:hover {
        cursor: pointer;
    }
    label.hamburger text close,
    label.hamburger text open {
        text-transform: uppercase;
        align-text: center;
        position: absolute;
        -webkit-transform: translateY(24px);
        transform: translateY(24px);
        text-align: center;
        overflow: hidden;
        -webkit-transition: width .25s .35s, color .45s .35s;
        transition: width .25s .35s, color .45s .35s;
        font-size: 6px;
    }
    label.hamburger text close {
        color: rgba(255, 255, 255, 0.8);
        right: 0;
        width: 0;
    }
    label.hamburger text open {
        color: rgba(255, 255, 255, 0.8);
        width: 100%;
    }
    label.hamburger > i {
        position: absolute;
        width: 100%;
        height: 2px;
        top: 50%;
        background-color: rgba(255, 255, 255, 0.8);
        pointer-events: auto;
        -webkit-transition-duration: .35s;
        transition-duration: .35s;
        -webkit-transition-delay: .35s;
        transition-delay: .35s;
    }
    label.hamburger > i:before, label.hamburger > i:after {
        position: absolute;
        display: block;
        width: 100%;
        height: 2px;
        left: 50%;
        background-color: rgba(255, 255, 255, 0.8);
        content: "";
        -webkit-transition: -webkit-transform 0.35s;
        transition: -webkit-transform 0.35s;
        transition: transform 0.35s;
        transition: transform 0.35s, -webkit-transform 0.35s;
        -webkit-transform-origin: 50% 50%;
        transform-origin: 50% 50%;
    }
    label.hamburger > i:before {
        -webkit-transform: translate(-50%, -7px);
        transform: translate(-50%, -7px);
    }
    label.hamburger > i:after {
        -webkit-transform: translate(-50%, 7px);
        transform: translate(-50%, 7px);
    }

    label.hamburger {
        position: fixed;
        top: 14px;
        left: 17px;
    }

    .tabs {
        font-family: 'Roboto', sans-serif;
        text-transform: uppercase;
        font-size: 1rem;
        position: fixed;
        top: 58px;
        left: 0;
        background-color: rgb(253, 105, 7);
        border-bottom: 1px solid yellow;
        width: 100vw;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        vertical-align:middle
    }
    @media (min-width: 650px) {
        .tabs {
            padding-left: calc(58px + .5rem);
            top: calc(58px - 3em);
            background-color: #030303;
            border: 0;
            margin-top: -8px;
            height: 76px;
        }
    }
    .tabs > ul {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-pack: distribute;
        justify-content: space-around;
        overflow-x: auto;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    }
    @media (min-width: 650px) {
        .tabs > ul {
            -webkit-box-pack: start;
            -ms-flex-pack: start;
            justify-content: flex-start;
        }
    }
    .tabs .tab {
        font-weight: 300;
        font-size: .7em;
        padding: 1em;
        white-space: nowrap;
        -ms-flex-negative: 0;
        flex-shrink: 0;
        display: block;
        color: rgba(255, 255, 255, 0.8);
        text-decoration: none;
    }
    .tabs .tab:hover {
        background-color: rgb(253, 105, 7);
        cursor: pointer;
    }
    .t1:hover{
        background-color: red;
    }
    .t2:hover{
        background-color:  rgb(253, 105, 7);
    }
    .mainlevel{float:left;/*IE6 only*/}
    .mainlevel a{text-decoration:none;line-height:32px;display:block; font-weight: 800;}
    .mainlevel a:hover,#nav .mainlevel a.cur{text-decoration:none;}
    .mainlevel ul{display:none;position:absolute;}
    .mainlevel li{border-top:1px solid #fff;background:#0e0d0c;width:102px;/*IE6 only*/}
    .pp:hover{
        background-color: rgb(6, 149, 185);
        color: white;
    }
</style>

</head>

<form id="gaopoint" style="display: none;" >
    <br>
    <div>
        <p style="position: fixed; margin-left: 20px; ">经度&nbsp;&nbsp;：</p><br><input id="ss3" name="taskLongitudeY" style="position: fixed;margin-left: 120px;"></div>
    <br>
    <div>

        <p style="position: fixed; margin-left: 20px;">纬度&nbsp;&nbsp;：</p><br><input id="ss4" name="taskLatitudeX" style="position: fixed;margin-left: 120px;">
    </div>
    <br>
    <p style="color: red;text-align: center;">风险点位信息： </p>
    <p style="text-align: center;">&nbsp;&nbsp;<textarea type="text" style="height: 300px;width: 400px;float: left; margin-left: 14px; font-size: 15px; "placeholder="请输入风险点位信息"  id="gao" name="taskInfo" ></textarea></p>
    <br>
    <br>
    <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 200px; " onclick="point1()" value="确认"></input>
</form>
<form id="zhongpoint" style="display: none;" >
    <br>
    <div>
        <p style="position: fixed; margin-left: 20px; ">经度&nbsp;&nbsp;：</p><br><input id="ss5" name="taskLongitudeY" style="position: fixed;margin-left: 120px;"></div>
    <br>
    <div>

        <p style="position: fixed; margin-left: 20px;">纬度&nbsp;&nbsp;：</p><br><input id="ss6" name="taskLatitudeX" style="position: fixed;margin-left: 120px;">
    </div>
    <br>
    <p style="color: red;text-align: center;">风险点位信息： </p>
    <p style="text-align: center;">&nbsp;&nbsp;<textarea type="text" style="height: 300px;width: 400px;float: left; margin-left: 14px; font-size: 15px; "placeholder="请输入风险点位信息"  id="zhong" name="taskInfo" ></textarea></p>
    <br>
    <br>
    <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 200px; " onclick="point2()" value="确认"></input>
</form>
<form id="dipoint" style="display: none;" >
    <br>
    <div>
        <p style="position: fixed; margin-left: 20px; ">经度&nbsp;&nbsp;：</p><br><input id="ss7" name="taskLongitudeY" style="position: fixed;margin-left: 120px;"></div>
    <br>
    <div>

        <p style="position: fixed; margin-left: 20px;">纬度&nbsp;&nbsp;：</p><br><input id="ss8" name="taskLatitudeX" style="position: fixed;margin-left: 120px;">
    </div>
    <br>
    <p style="color: red;text-align: center;">风险点位信息： </p>
    <p style="text-align: center;">&nbsp;&nbsp;<textarea type="text" style="height: 300px;width: 400px;float: left; margin-left: 14px; font-size: 15px; "placeholder="请输入风险点位信息"  id="di" name="taskInfo" ></textarea></p>
    <br>
    <br>
    <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 200px; " onclick="point3()" value="确认"></input>
</form>
<form id="person" style="display: none;">

    <br>
    <p style="color: red;text-align: center;">请选择你要派遣的巡更人员： </p>
    <div id="contentss"></div>
    <input type="button"  style="background-color: yellowgreen;width: 100px;height: 40px;margin-left: 160px; text-align: center; font-weight: 800;" onclick="send()" value="发送巡更路线"></input>
</form>



<form id="choice" style="display: none;text-align: center;" >

    <div >

        <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 5px; " onclick="init()" value="确认"></input>
        <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 55px; "  value="取消"></input>


    </div>

</form>

<form id="planroute" style="display: none;text-align: center;">

    <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 5px; " onclick="" value="确认"></input>
</form>



<form id="idea" style="display: none;">
    <br>
    <p style="color: red;text-align: center;">从起点到终点全程距离和时间： </p>
    <table  style="text-align: center;" cellspacing="0" cellpadding="0">


        <td><table style="text-align: center;"  cellspacing="0" cellpadding="0">
            <tr>
                <td width="50"> </td>
                <td width="19"><span style="padding-top: 2px;"></span></td>
                <td width="90" style="font-size: 12px;"> 出发城市 </td>
                <td>
                    <input name="farea" type="text" id="farea" size="10" /></td>
                <td width="26" align="center" style="font-size: 12px;"> 到 </td>
                <td width="110"><input name="tarea" type="text" id="tarea" size="10" />
                </td>
                <td><div onclick="times(); return false;" style="cursor: pointer; width:81px;">查询</div>


                </td>
            </tr>
        </table></td>
        </tr>
    </table>
    <div style="border: #cccccc 1px solid; text-align: center;">
        <div class="content_title" style="color:Red; background-image:url();border-bottom:solid 1px #ccc; height:30px; text-align:center; font-weight:bold; line-height:30px;" id="div_title">查询结果</div>
        <div id="div_gongli" style="color:#336600; font-weight:bold; padding-left:5px; line-height:35px; font-size:14px;"></div>
        <div id="results" style="font-size: 12px;">        </div>
    </div>

</form>





<body onload="inits()">

<form id="my_dialog" style="display: none;text-align: center;" >
    <br>
    <div>
        <p style="position: fixed; margin-left: 80px; ">经度&nbsp;&nbsp;：</p><br><input id="ss1" name="taskLongitudeY" style="position: fixed;margin-left: -28px;"></div>
    <br>
    <div>

        <p style="position: fixed; margin-left: 80px;">纬度&nbsp;&nbsp;：</p><br><input id="ss2" name="taskLatitudeX" style="position: fixed;margin-left: -28px;">
    </div>
    <br>
    <p>任务名称&nbsp;&nbsp;：<input type="text" id="create_name1" name="taskName" placeholder="请输入任务名称" /></p>

    <p>任务地址&nbsp;&nbsp;：<input type="text" id="create_name2" name="taskAddress" placeholder="请输入任务地址" /></p>
    <p>任务信息&nbsp;&nbsp;：<textarea type="text" style="height: 110px; font-size: 15px; "placeholder="请输入任务信息"  id="create_name3" name="taskInfo" ></textarea></p>
    <p>打卡频次&nbsp;&nbsp;：<input type="text" id="create_name4" name="frequency" placeholder="请输入打卡频次" /></p>
    <p>点位类型&nbsp;&nbsp;：<select id="create_type2" >
        <option value ="任务点">任务点</option>
        <option value ="打卡点">打卡点</option>
        <option value ="其他">其他</option>
    </select>
    </p>

    <p>任务类型&nbsp;&nbsp;：<select id="create_type1" name="taskType" >
        <option value ="1" name="taskType">1</option>
        <option value ="2" name="taskType">2</option>
        <option value ="其他" name="taskType">其他</option>
    </select>
    <div >
        <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 5px;text-align: center; " onclick="addpoint()" value="保存"></input>



    </div>
</form>


<form id="my_dialog2" style="display: none;text-align: center;" >
    <br>
    <div>
        <p>点位ID&nbsp;&nbsp;：<input type="text" id="taskid" name="taskId" readonly="readonly"></p>
        <p style="position: fixed; margin-left: 80px; ">经度&nbsp;&nbsp;：</p><br><input id="st1" name="taskLongitudeY" style="position: fixed;margin-left: -28px;"></div>
    <br>
    <div>

        <p style="position: fixed; margin-left: 80px;">纬度&nbsp;&nbsp;：</p><br><input id="st2" name="taskLatitudeX" style="position: fixed;margin-left: -28px;">
    </div>
    <br>
    <p>任务名称&nbsp;&nbsp;：<input type="text" id="create_name1" name="taskName" placeholder="请输入任务名称" /></p>

    <p>任务地址&nbsp;&nbsp;：<input type="text" id="create_name2" name="taskAddress" placeholder="请输入任务地址" /></p>
    <p>任务信息&nbsp;&nbsp;：<textarea type="text" style="height: 110px; font-size: 15px; "placeholder="请输入任务信息"  id="create_name3" name="taskInfo" ></textarea></p>
    <p>打卡频次&nbsp;&nbsp;：<input type="text" id="create_name4" name="frequency" placeholder="请输入打卡频次" /></p>
    <p>点位类型&nbsp;&nbsp;：<select id="create_type2" >
        <option value ="任务点">任务点</option>
        <option value ="打卡点">打卡点</option>
        <option value ="其他">其他</option>
    </select>
    </p>

    <p>任务类型&nbsp;&nbsp;：<select id="create_type1" name="taskType" >
        <option value ="1" name="taskType">1</option>
        <option value ="2" name="taskType">2</option>
        <option value ="其他" name="taskType">其他</option>
    </select>
    <div >
        <input type="button"  style="background-color: yellowgreen;width: 50px;height: 30px;margin-left: 5px;text-align: center; " onclick="changepoint()" value="修改"></input>



    </div>
</form>
<script  type="text/javascript">


    var element = layui.element;
    $ (document).on( 'click', '#xungengid', function(){
        // layer.msg("点击了个人资料");
        layer.open({
            type: 2,
            area:['70%','60%'],
            content:"baobiao1.html" ,//不想让iframe出现滚动可以content: ['http://sentsin.com', 'no']
            title: ['按巡更人ID查询', 'font-size:18px;'],
            shade:['0.2','red']
        });
    });
    $(document).on( 'click', '#xungengsum', function(){
        layer.open({
            type: 2,
            area:['80%','90%'],
            content: "baobiao2.html" ,//不想让iframe出现滚动可以content: ['http://sentsin.com', 'no']
            title: ['按巡更人总数查询', 'font-size:18px;'],
            shade:['0.2','red']
        });
    });
    $(document).on( 'click', '#fengxianid', function(){
        layer.open({
            type: 2,
            area:['80%','90%'],
            content: "baobiao3.html" ,//不想让iframe出现滚动可以content: ['http://sentsin.com', 'no']
            title: ['按巡更id查询', 'font-size:18px;'],
            shade:['0.2','red']
        });
    });
    $(document).on( 'click', '#fengxiantotal', function(){
        layer.open({
            type: 2,
            area:['80%','90%'],
            content: "baobiao4.html" ,//不想让iframe出现滚动可以content: ['http://sentsin.com', 'no']
            title: ['按巡更时段查询', 'font-size:18px;'],
            shade:['0.2','red']
        });
    });
    $(document).on( 'click', '#baobiaototal', function(){
        layer.open({
            type: 2,
            area:['90%','90%'],
            content: "baobiaototal.html" ,//不想让iframe出现滚动可以content: ['http://sentsin.com', 'no']
            title: ['报表导出', 'font-size:18px;'],
            shade:['0.2','red']
        });
    });
</script>
<input id="hamburger" class="hamburger" type="checkbox" />
<label for="hamburger" class="hamburger">
    <i></i>
    <text>
        <close>关闭</close>
        <open>菜单</open>
    </text>
</label>


<nav class="primnav" style="z-index: 200;">
    <ul>
        <li>
            <a title="生成报表" id='baobiaototal' style="cursor: pointer">
                <svg t="1628323805910" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4537" width="200" height="200"><path d="M914.369536 16.868352 110.189568 16.868352c-28.992512 0-52.497408 23.5008-52.497408 52.497408l0 883.704832c0 28.992512 23.50592 52.497408 52.497408 52.497408l534.84032 0 172.776448 0 96.564224 0c28.992512 0 52.497408-23.50592 52.497408-52.497408L966.867968 69.36576C966.867968 40.368128 943.362048 16.868352 914.369536 16.868352zM356.176896 61.21472c9.500672-1.640448 19.033088 4.426752 20.922368 14.081024 0.198656 1.04448 6.438912 28.804096 34.126848 33.67936l181.513216-0.249856c24.574976-4.625408 30.821376-32.385024 31.066112-33.57696 2.04288-9.551872 11.493376-15.476736 21.019648-13.831168 9.577472 1.98656 15.822848 11.24352 13.959168 20.846592-0.422912 2.13504-10.897408 52.731904-62.936064 61.937664l-93.879296 0.249856-93.848576 0c-55.151616-9.455616-65.620992-60.05248-66.043904-62.18752C340.206592 72.45824 346.503168 63.105024 356.176896 61.21472zM759.968768 576.62464 161.37728 576.62464c-9.847808 0-17.835008-7.957504-17.835008-17.810432s7.988224-17.810432 17.835008-17.810432l598.591488 0c9.852928 0 17.835008 7.957504 17.835008 17.810432S769.821696 576.62464 759.968768 576.62464zM143.542272 444.19072c0-9.852928 7.988224-17.810432 17.835008-17.810432l399.069184 0c9.852928 0 17.835008 7.957504 17.835008 17.810432s-7.983104 17.810432-17.835008 17.810432L161.37728 462.001152C151.530496 462.001152 143.542272 454.043648 143.542272 444.19072zM759.968768 334.641152 161.37728 334.641152c-9.847808 0-17.835008-7.957504-17.835008-17.810432s7.988224-17.810432 17.835008-17.810432l598.591488 0c9.852928 0 17.835008 7.957504 17.835008 17.810432S769.821696 334.641152 759.968768 334.641152z" p-id="4538"></path></svg>生成报表
            </a>
            <ul class="secnav">
                <li>
                    <a title="按巡更人ID查询" class="t1" id="xungengid" style="cursor: pointer">巡更人ID报表</a>
                </li>
                <li>
                    <a title="按巡更人总数查询" class="t1" id='xungengsum' style="cursor: pointer">巡更总数报表</a>
                </li>
                <li>
                    <a title="按巡更人ID查询" class="t1" id='fengxianid' style="cursor: pointer"> 巡更ID报表</a>
                </li>
                <li>
                    <a title="按巡更时段查询" class="t1" id='fengxiantotal' style="cursor: pointer">巡更时段报表</a>
                </li>
            </ul>
        </li>
        <li>
            <a title="查看风险记录" href="#mail">
                <svg t="1628323330253" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4007" width="200" height="200"><path d="M934.966272 879.950848 709.541888 654.526464c47.665152-59.81696 76.166144-135.581696 76.166144-218.012672 0-193.36704-156.752896-350.124032-350.12096-350.124032S85.464064 243.145728 85.464064 436.513792s156.756992 350.124032 350.124032 350.124032c79.875072 0 153.486336-26.766336 212.39808-71.79264l226.04288 226.04288c8.416256 8.416256 19.441664 12.62592 30.470144 12.62592 11.025408 0 22.050816-4.209664 30.466048-12.62592C951.798784 924.055552 951.798784 896.782336 934.966272 879.950848zM165.953536 436.513792c0-148.912128 120.722432-269.630464 269.63456-269.630464S705.21856 287.60064 705.21856 436.513792 584.500224 706.148352 435.588096 706.148352 165.953536 585.42592 165.953536 436.513792z" p-id="4008"></path><path d="M291.135488 302.036992c-8.997888-4.864-20.23424-1.511424-25.097216 7.486464-20.256768 37.476352-32.600064 78.152704-36.688896 120.899584-0.973824 10.181632 6.491136 19.224576 16.672768 20.1984 0.59904 0.057344 1.195008 0.084992 1.784832 0.084992 9.433088 0 17.497088-7.175168 18.413568-16.75776 3.613696-37.7856 14.5152-73.72288 32.401408-106.814464C303.485952 318.138368 300.1344 306.900992 291.135488 302.036992z" p-id="4009"></path></svg> 查看风险记录

            </a>
            <ul class="secnav">
                <li>
                    <a title="按巡更人姓名查询" class="t1" href="#inbox">按巡更人姓名查询</a>
                </li>
                <li>
                    <a title="按巡更时段查询" class="t1" href="#sent">按巡更时段查询</a>
                </li>
            </ul>
        </li>
        <li>
            <a title="个人中心" href="#notifications">
                <svg t="1628323498359" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4140" width="200" height="200"><path d="M626.568192 981.999616l-23.379968 0-36.857856 0.283648L68.137984 982.283264l0-23.989248c0 0-10.815488-134.006784 186.535936-168.308736 0 0 150.230016-20.28032 160.748544-61.595648 0 0 5.732352-4.596736 1.502208-52.578304-9.017344-102.161408-75.86816-150.234112-102.909952-189.293568-27.041792-39.063552-29.293568-84.13184-29.293568-84.13184 0-11.264 4.716544-15.391744 12.560384-22.626304 9.696256-8.950784 6.786048-18.4576 4.934656-28.52864-7.04512-38.23616-7.666688-99.662848-0.970752-138.138624 1.502208-45.820928 43.56608-82.625536 43.56608-82.625536 7.892992-6.695936 15.803392-14.062592 21.343232-22.898688 1.547264-2.460672 2.970624-5.09952 3.8144-7.897088 3.16928-10.548224-7.560192-18.292736-5.407744-29.51168 1.942528-10.116096 19.280896-10.61376 29.766656-11.164672 23.614464-1.243136 47.347712-2.172928 70.925312-0.366592C641.71008 72.155136 699.725824 137.1136 699.725824 137.1136c13.73696 16.449536 22.787072 36.566016 28.23168 57.184256 1.630208 6.16448 3.028992 12.45696 3.785728 18.79552 5.501952 31.602688 5.481472 64.559104 3.770368 96.494592-0.815104 15.22688-2.584576 30.215168-4.819968 45.282304-1.17248 7.8848-0.571392 15.222784 4.70016 21.523456 4.4032 5.271552 9.44128 8.95488 11.60192 15.881216 1.011712 3.238912 1.275904 6.736896 1.275904 10.112 0 0-2.255872 45.068288-29.297664 84.13184-27.041792 39.059456-93.893632 87.13216-102.905856 189.293568-4.23424 47.981568 1.502208 52.578304 1.502208 52.578304 10.514432 41.314304 160.748544 61.595648 160.748544 61.595648 199.55712 37.010432 186.53184 168.308736 186.53184 168.308736l0 23.989248-131.3792 0 20.70016-0.283648L836.49536 982.00064l-36.64384 0L626.568192 982.00064 626.568192 981.999616z" p-id="4141"></path></svg> 个人中心

            </a>
        </li>
        <li>
            <a title="管理用户角色" href="#sysadmin">
                <svg t="1628323605013" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4405" width="200" height="200"><path d="M934.989824 798.204928 728.061952 591.27296c0 0-25.198592-21.021696-8.148992-47.665152 16.918528-40.154112 26.3424-84.230144 26.3424-130.541568 0-186.354688-151.068672-337.419264-337.424384-337.419264-32.124928 0-63.101952 4.70016-92.489728 13.186048-25.182208 8.679424-7.297024 26.976256-7.297024 26.976256L464.493568 271.2576c49.924096 49.92 49.924096 130.86208 0 180.786176l-15.066112 15.062016c-49.92 49.924096-130.86208 49.924096-180.786176 0L110.743552 309.209088c0 0-16.201728-13.57312-24.827904 6.810624-9.329664 30.738432-14.501888 63.26272-14.501888 97.045504 0 186.354688 151.064576 337.42848 337.419264 337.42848 50.5088 0 98.400256-11.140096 141.4144-31.04256 19.42528-10.06592 33.886208 6.510592 33.886208 6.510592l211.454976 211.64032c21.174272 21.178368 50.19136 29.737984 77.707264 25.67168 0 0 71.246848-6.39488 87.115776-85.777408C965.049344 849.519616 956.57472 819.785728 934.989824 798.204928z" p-id="4406"></path></svg> 管理用户角色
            </a>
            <ul class="secnav">
                <li>
                    <a title="用户信息" class="t1" href="#users">用户信息</a>
                </li>
                <li>
                    <a title="发送即时消息" class="t1" href="#lists">发送即时消息</a>
                </li>
                <li>
                    <a title="经纬度转换器" class="t1" href="#calendar">经纬度转换器</a>
                </li>
            </ul>
        </li>
    </ul>
</nav>

<user id="user">
    <section >
        <svg t="1628323498359" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4140" width="200" height="200"><path d="M626.568192 981.999616l-23.379968 0-36.857856 0.283648L68.137984 982.283264l0-23.989248c0 0-10.815488-134.006784 186.535936-168.308736 0 0 150.230016-20.28032 160.748544-61.595648 0 0 5.732352-4.596736 1.502208-52.578304-9.017344-102.161408-75.86816-150.234112-102.909952-189.293568-27.041792-39.063552-29.293568-84.13184-29.293568-84.13184 0-11.264 4.716544-15.391744 12.560384-22.626304 9.696256-8.950784 6.786048-18.4576 4.934656-28.52864-7.04512-38.23616-7.666688-99.662848-0.970752-138.138624 1.502208-45.820928 43.56608-82.625536 43.56608-82.625536 7.892992-6.695936 15.803392-14.062592 21.343232-22.898688 1.547264-2.460672 2.970624-5.09952 3.8144-7.897088 3.16928-10.548224-7.560192-18.292736-5.407744-29.51168 1.942528-10.116096 19.280896-10.61376 29.766656-11.164672 23.614464-1.243136 47.347712-2.172928 70.925312-0.366592C641.71008 72.155136 699.725824 137.1136 699.725824 137.1136c13.73696 16.449536 22.787072 36.566016 28.23168 57.184256 1.630208 6.16448 3.028992 12.45696 3.785728 18.79552 5.501952 31.602688 5.481472 64.559104 3.770368 96.494592-0.815104 15.22688-2.584576 30.215168-4.819968 45.282304-1.17248 7.8848-0.571392 15.222784 4.70016 21.523456 4.4032 5.271552 9.44128 8.95488 11.60192 15.881216 1.011712 3.238912 1.275904 6.736896 1.275904 10.112 0 0-2.255872 45.068288-29.297664 84.13184-27.041792 39.059456-93.893632 87.13216-102.905856 189.293568-4.23424 47.981568 1.502208 52.578304 1.502208 52.578304 10.514432 41.314304 160.748544 61.595648 160.748544 61.595648 199.55712 37.010432 186.53184 168.308736 186.53184 168.308736l0 23.989248-131.3792 0 20.70016-0.283648L836.49536 982.00064l-36.64384 0L626.568192 982.00064 626.568192 981.999616z" p-id="4141"></path></svg>
        <section>
            <name>应急消防在线巡更系统</name>
            <actions><a href="#settings">欢迎登录</a>| <a href="#logout">退出登录</a></actions>
        </section>
    </section>
</user>

<content>
    <nav class="tabs" style="z-index: 500;" >
        <ul style="vertical-align: middle; margin-top: 14px;" id="nav">
            <li class="mainlevel" ><a class="tab" href="javascript:void(0)" style="font-weight: 800; " onclick="show()">



                任务点管理</a>

            </li>
            <script>


                var flag=1;


                function show()
                {
                    myp=[];
                    flagx=1;
                    document.getElementById('cars').className='pp';
                    document.getElementById('run').className='pp';
                    document.getElementById('ride').className='pp';
                    document.getElementById('setpoint').className='pp';


                    flag++;

                    if(flag%2==0)
                    {
                        document.getElementById('watch').className='layui-btn';
                        model=flags;
                        document.getElementById('xx').style.display='block';
                        document.getElementById('controller').style.display='none';
                        document.getElementById('plarou').style.display='none';
                        document.getElementById('choicepoint').style.display='none';
                        document.getElementById("danger").style.display='none';
                        mp.clearOverlays();

                    }
                    else
                    {
                        document.getElementById('xx').style.display='none';
                        document.getElementById('watch').className='pp';
                    }



                }


            </script>

            <li class="mainlevel"><a class="tab" href="#"style="font-weight: 800; ">管理巡更路线</a>
                <ul style="font-size: 15px;">
                    <li class="t2" style="width: 118px;"><a  onclick="planroute()" style="color: white; text-align: center;cursor: pointer;">路线规划</a></li>
                    <li class="t2" style="width: 118px;"><a  style="color: white; text-align: center;cursor: pointer;">实时轨迹</a></li></ul>
            </li>
            <script >
                function planroute(){
                    flag=1;
                    document.getElementById('cars').className='layui-btn';
                    document.getElementById('run').className='layui-btn';
                    document.getElementById('ride').className='layui-btn';
                    document.getElementById('xx').style.display='none';
                    document.getElementById('plarou').style.display='block';//显示控件按钮
                    document.getElementById('controller').style.display='none';
                    document.getElementById('choicepoint').style.display='none';
                    document.getElementById("danger").style.display='none';
                    document.getElementById('begins').disabled=true;

                }
            </script>
            <li class="mainlevel"><a class="tab" href="#"style="font-weight: 800;" onclick="choose()">查看巡更记录</a>

            </li>
            <script>

                function choose()
                {
                    myp=[];
                    mp.clearOverlays();
                    flagx=1;
                    layer.open({
                        type: 1,
                        area:['28%','80%'],
                        content: $('#choice') ,
                        title: ['请选择你要查看的人员', 'font-size:18px;'],
                        shade:['0.2','red'],

                        cancel:function() {
                            $('#choice').hide();
                        }  })


                }




            </script>
            <li class="mainlevel"><a class="tab" onclick="dangers()"  style="font-weight: 800;">风险点位标记</a>

            </li>
            <script>
                function dangers()
                {
                    myp=[];
                    mp.clearOverlays();
                    flagx=1;
                    document.getElementById("danger").style.display='block';
                    document.getElementById('xx').style.display='none';
                    document.getElementById('controller').style.display='none';
                    document.getElementById('plarou').style.display='none';
                    document.getElementById('choicepoint').style.display='none';
                }
            </script>
        </ul>
    </nav>


    <div style="width: 100%; height:100%; margin-top: 135px;font-size: 16px;">
        <!-- <iframe  src="xungeng.html"  name="main" width="100%" style="height: 100%" frameborder="0"></iframe> -->
        <div style="position: fixed; bottom: 0; height: 20vh;background: rgba(0,0,0,0);width: 100%;z-index: 10;display: flex;justify-content: center;align-items: center;opacity: inherit">
            <div class="tools"  style="width: 100%;height: 100%">
                <div class="btn-contrail" style="height: 100%;opacity: inherit;width: 100%;display: flex;flex-direction: column;justify-content: center;align-items: center;">
          <span style="margin: 100px;display: none;" class="sd" id="xx" >
                  <button style="display: inline-block;margin: 50px" id="watch" type="button" class="layui-btn" data-model="0">查看任务点</button>
                <button style="display: inline-block;margin: 50px" id="watch"  type="button" class="layui-btn" data-model="1">标记任务点</button>
                <button style="display: inline-block;margin: 50px" id="watch" type="button" class="layui-btn" data-model="2">删除任务点</button>
                <button style="display: inline-block;margin: 50px" id="watch" type="button" class="layui-btn" data-model="3">画区域</button>
                <button style="display: inline-block;margin: 50px" id="watch" type="button" class="layui-btn" data-model="4">清除域</button>
                <button style="display: inline-block;margin: 50px" id="watch" type="button" class="layui-btn" data-model="5">计算任务点</button>


          </span>
                    <span style="display: none;" class="sd" id="controller" >

        <button style="display: inline-block;margin: 50px" class="pp"  type="button" id="play" onclick="play();" >播放</button>
        <button style="display: inline-block;margin: 50px" class="pp" type="button" id="pause" onclick="pause()">暂停</button>
        <button style="display: inline-block;margin: 50px" class="pp" type="button" id="reset" onclick="reset()">重置</button>
        <button style="display: inline-block;margin: 50px" class="pp" type="button" id="exit" onclick="exit()">退出</button>
        <input id="follow" type="checkbox" style="width: 20px;height: 20px;"><span style="font-size:30px;color: #030303;font-weight: 800;border-radius:black 2px;background-color: white;margin-top: 20px;"  >画面跟随</span></input>
      </span>

                    <span style="display: none;" class="sd" id="plarou" >
        <button style="display: inline-block;margin: 50px" class="pp"  type="button" id="choosepoint" onclick="choosepoint();" >选定点位</button>
        <button style="display: inline-block;margin: 50px" class="pp"  type="button" id="begins" onclick="begins()"  >模拟路线</button>
        <button style="display: inline-block;margin: 50px" class="layui-btn" data-model="6" type="button" id="cars" >驾车方式</button>
        <button style="display: inline-block;margin: 50px" class="layui-btn" data-model="7" type="button" id="run" >步行方式</button>
        <button style="display: inline-block;margin: 50px" class="layui-btn" data-model="8" type="button" id="ride" >骑行方式</button>
        <button style="display: inline-block;margin: 50px"  type="button" data-model="10" class="pp" id="time" onclick="time()">计算时间</button>
        <button style="display: inline-block;margin: 50px" class="pp" type="button" id="text" onclick="text()" >派遣人员</button>
        <button style="display: inline-block;margin: 50px" class="pp" type="button" id="exits" onclick="exits()">退出</button>



      </span>
                    </span>
                    <span style="display: none;" class="sd" id="choicepoint" >

<button style="display: inline-block;margin: 50px" class="layui-btn " data-model="9"  type="button" id="setpoint" >标记点位</button>


<button style="display: inline-block;margin: 50px" class="pp" type="button" id="backs" onclick="backs()">返回上一步</button>

</span>


                    <span style="display: none;" class="sd" id="danger" >

    <button style="display: inline-block;margin: 50px" class="layui-btn" data-model="11" type="button" id="high"  >高风险点位标记</button>
    <button style="display: inline-block;margin: 50px" class="layui-btn" data-model="12" type="button" id="middle">中风险点位标记</button>
    <button style="display: inline-block;margin: 50px" class="layui-btn" data-model="13" type="button" id="low" >低风险点位标记</button>
    <button style="display: inline-block;margin: 50px" class="pp" type="button" id="exitend" onclick="exitend()">退出</button>

  </span>
                    <script>
                        function exitend(){
                            document.getElementById("danger").style.display='none';
                        }
                        function exits(){
                            myp=[];
                            flagx=1;
                            document.getElementById('cars').className='pp';
                            document.getElementById('run').className='pp';
                            document.getElementById('ride').className='pp';
                            document.getElementById('plarou').style.display='none';//关闭显示控件按钮
                            mp.clearOverlays();
                        }
                        function time(){
                            layer.open({
                                type: 1,
                                area:['28%','70%'],
                                content: $('#idea') ,
                                title: ['全程查询结果', 'font-size:18px;'],
                                shade:['0.2','red'],

                                cancel:function() {
                                    $('#idea').hide();
                                }  })
                            var oGl = document.getElementById("div_gongli");
                            var ofname = document.getElementById("farea");
                            var otname = document.getElementById("tarea");
                            var output = "全程：";
                            var searchComplete = function(results) {
                                if (transit.getStatus() != BMAP_STATUS_SUCCESS) { return; }
                                var plan = results.getPlan(0);
                                output += plan.getDistance(true);       //获取距离
                                output += "/";
                                output += plan.getDuration(true);        //获取时间
                            }
                            var transit = new BMap.DrivingRoute(mp, { renderOptions: { mp: mp, panel: "results", autoViewport: true },
                                onSearchComplete: searchComplete,
                                onPolylinesSet: function() { oGl.innerText = output; }
                            });
                            transit.search(starts,ends);

                        }
                        function times()
                        {
                            var oGl = document.getElementById("div_gongli");
                            var ofname = document.getElementById("farea");
                            var otname = document.getElementById("tarea");
                            var output = "全程：";
                            if (ofname.value == "") {
                                alert('请输入出发地！');
                                return;
                            }
                            if (otname.value == "") {
                                alert('请输入到达地!');
                                return;
                            }


                            var searchComplete = function(results) {
                                if (transit.getStatus() != BMAP_STATUS_SUCCESS) { return; }
                                var plan = results.getPlan(0);
                                output += plan.getDistance(true);       //获取距离
                                output += "/";
                                output += plan.getDuration(true);        //获取时间
                            }
                            var transit = new BMap.DrivingRoute(mp, { renderOptions: { mp: mp, panel: "results", autoViewport: true },
                                onSearchComplete: searchComplete,
                                onPolylinesSet: function() { oGl.innerText = output; }
                            });
                            transit.search(ofname.value, otname.value);
                        }
                    </script>


                </div>
            </div>
        </div>



        <!-- 地图容器 -->
        <div id="container" style="height: 100vh;width: 100%"></div>
        <!-- jquery -->
        <script type="text/javascript" src="js/jquery.min.js" ></script>
        <!-- 百度地图api -->
        <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=E06eb9d756d0eafc722effb355657b4c"></script>

        <!-- 点聚合工具 -->
        <script type="text/javascript" src="http://api.map.baidu.com/library/TextIconOverlay/1.2/src/TextIconOverlay_min.js"></script>
        <!-- 点聚合工具 -->
        <script type="text/javascript" src="https://api.map.baidu.com/library/MarkerClusterer/1.2/src/MarkerClusterer_min.js"></script>
        <!--加载鼠标绘制工具-->
        <script type="text/javascript" src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"></script>

        <script type="text/javascript">


            var startLong = 106.652024;
            var startLat = 26.617221;
            var endLong = 106.652024;
            var endLat = 26.614221;

            var startLongR = 106.652024;
            var startLatR = 26.617221;
            var endLongR = 106.652024;
            var endLatR = 26.614221;
            var linesPoints = null;

            // 工具栏模式：0-查看点1-标新点2-删除点3-画区域4-清除域5-计算点
            var model = 0;

            var areaPoint = [];
            var points = [
                new BMap.Point(114.00100, 22.550000), new BMap.Point(114.00130, 22.550000),
                new BMap.Point(114.00160, 22.550000), new BMap.Point(114.00200, 22.550000),
                new BMap.Point(114.00300, 22.550500), new BMap.Point(114.00400, 22.550000),
                new BMap.Point(114.00500, 22.550000), new BMap.Point(114.00505, 22.549800),
                new BMap.Point(114.00510, 22.550000), new BMap.Point(114.00515, 22.550000),
                new BMap.Point(114.00525, 22.550400), new BMap.Point(114.00537, 22.549500)
            ];

            var map;   //百度地图对象
            var car;   //汽车图标
            var label; //信息标签
            var centerPoint;
            var route;//线路
            var timer;     //定时器
            var index = 0; //记录播放到第几个point
            var flags=0;
            var followChk, playBtn, pauseBtn, resetBtn; //几个控制按钮
            var myp=[];
            var starts;
            var ends;

            // 切换模式
            $('body').on('click', '.layui-btn', function() {
                // 样式改变
                $('.btn-contrail').find('.layui-btn').removeClass('btn-click');
                $(this).addClass('btn-click');
                // 事件监听
                model = $(this).data('model');
                flags=$(this).data('model');
                if(3 == model) {
                    $('.BMapLib_Drawing').show();
                } else {
                    $('.BMapLib_Drawing').hide();
                }
                // 清除域
                if(4 == model) {
                    clearAll();
                }
                // 计算点
                if(5 == model) {

                    layer.alert('所选区域点数：' + areaPoint.length, { icon: 6, title: "提示：请先刷新页面，已确保数据正确", offset: "auto", skin: 'layui-layer-molv' });

                }
            });

            // 定义地图
            var mp = new BMap.Map("container");





            mp.addControl(new BMap.ScaleControl());
            // 地图中心点，并设置级别
            mp.centerAndZoom(new BMap.Point(106.651014,26.614221), 17);
            mp.addControl(new BMap.OverviewMapControl({
                isOpen: true,
                anchor : BMAP_ANCHOR_BOTTOM_RIGHT, //右下角
                offset : new BMap.Size(1,70) //进一步控制缩放按钮的水平竖直偏移量
            }));
            mp.addControl(new BMap.ScaleControl({
                isOpen: true,
                anchor : BMAP_ANCHOR_BOTTOM_LEFT, //右下角
                offset : new BMap.Size(1,70) //进一步控制缩放按钮的水平竖直偏移量
            }));
            //添加地图类型控件;
            // mp.addControl(new BMap.MapTypeControl());
            var MapTypeControl =  new BMap.MapTypeControl();
            MapTypeControl.setAnchor(BMAP_ANCHOR_TOP_RIGHT);

            MapTypeControl.setOffset(new BMap.Size(20,20));
            mp.addControl(MapTypeControl);
            mp.setCurrentCity("贵阳");
            // 地图类型，卫星地图
            // mp.setMapType(BMAP_HYBRID_MAP);
            mp.setMapType( BMAP_NORMAL_MAP);
            // 鼠标滚动缩放
            mp.enableScrollWheelZoom(true);
            // 地图缩放级别
            // mp.setZoom(18)

            // 请求数据，并渲染地图

            //通过DrivingRoute获取一条路线的point
            var driving = new BMap.DrivingRoute(mp);
            var flag2=0;
            var flag3;//记录点位id



            function init() {
                flag=1;
                mp.clearOverlays();



                followChk = document.getElementById("follow");
                playBtn = document.getElementById("play");
                pauseBtn = document.getElementById("pause");
                resetBtn = document.getElementById("reset");
                exitBtn = document.getElementById("exit");

                layer.closeAll();
                $('#choice').hide();
                document.getElementById('xx').style.display='none';
                document.getElementById('plarou').style.display='none';
                document.getElementById('controller').style.display='block';//显示控件按钮
                document.getElementById('choicepoint').style.display='none';
                model=0;



                driving.search(new BMap.Point(114.00100, 22.550000), new BMap.Point(113.95100, 22.550000));
                driving.setSearchCompleteCallback(function() {
                    //得到路线上的所有point
                    points = driving.getResults().getPlan(0).getRoute(0).getPath();
                    //画面移动到起点和终点的中间
                    centerPoint = new BMap.Point((points[0].lng + points[points.length - 1].lng) / 2, (points[0].lat + points[points.length - 1].lat) / 2);
                    mp.panTo(centerPoint);
                    //连接所有点

                    mp.addOverlay(new BMap.Polyline(points, {strokeColor: "black", strokeWeight: 5, strokeOpacity: 1}));
                    route=new BMap.Polyline(points, {strokeColor: "black", strokeWeight: 5, strokeOpacity: 1});
                    //巡更人员
                    label = new BMap.Label("巡更人员", {offset: new BMap.Size(-20, -20)});
                    car = new BMap.Marker(points[0]);
                    car.setLabel(label);
                    mp.addOverlay(car);

                    //点亮操作按钮
                    playBtn.disabled = false;
                    resetBtn.disabled = false;
                });


                flag2=1;
            }

            function play() {
                playBtn.disabled = true;
                pauseBtn.disabled = false;
                exitBtn.disabled=true;
                var point = points[index];
                if(index > 0) {
                    mp.addOverlay(new BMap.Polyline([points[index - 1], point], {strokeColor: "red", strokeWeight: 1, strokeOpacity: 1}));
                }
                label.setContent("经度: " + point.lng + "<br>纬度: " + point.lat);
                car.setPosition(point);
                index++;
                if(followChk.checked) {
                    mp.panTo(point);
                }
                if(index < points.length) {
                    timer = window.setTimeout("play(" + index + ")", 200);
                } else {
                    playBtn.disabled = true;
                    pauseBtn.disabled = true;
                    exitBtn.disabled=false;
                    mp.panTo(point);
                }
            }

            function pause() {
                playBtn.disabled = false;
                pauseBtn.disabled = true;
                exitBtn.disabled=false;
                if(timer) {
                    window.clearTimeout(timer);
                }
            }

            function reset() {
                followChk.checked = false;
                playBtn.disabled = false;
                pauseBtn.disabled = true;
                exitBtn.disabled=false;
                if(timer) {
                    window.clearTimeout(timer);
                }
                index = 0;
                car.setPosition(points[0]);
                mp.panTo(centerPoint);
            }
            // 渲染地图坐标点
            function renderMap() {
                var markers = [];
                points.forEach(v => {
                    // 创建新的坐标点
                    const marker = new BMap.Marker(new BMap.Point(v['lng'], v['lat']), {
                        icon: ''
                    })
                    // 为每一个点添加点击事件
                    marker.addEventListener('click', function() {
                        showPoint(v, marker);
                    });
                    markers.push(marker)
                })
                // 点聚合
                new BMapLib.MarkerClusterer(mp, {
                    markers: markers
                });
            }
            var flagx=1;
            // 监听地图点击事件
            mp.addEventListener("click", function(e) {
                var point = e.point;
                if(flagx==1)
                    starts=new BMap.Point(point.lng,point.lat);
                ends=new BMap.Point(point.lng,point.lat);
                // 创建信息窗口
                var fd=0;
                console.log("总测试");

                if(9 == model){



                    var myP1 = new BMap.Point(point.lng, point.lat);


                    var lab1 = new BMap.Label("标记点位序号: "+flagx,{position:myP1});






                    lab1.setStyle({
                        color : "#666867",
                        fontSize : "18px",
                        border:"0px",
                        background:"transparent"
                    });


                    if(e.overlay)
                    {

                        myp.push(myP1);
                        mp.addOverlay(lab1);
                        flagx++;
                    }





                }


                if(11==model)  {
                    document.getElementById("gao").value="";
                    layer.open({
                        type: 1,
                        area:['28%','85%'],
                        content: $('#gaopoint') ,
                        title: ['高风险点位信息编辑', 'font-size:18px;'],
                        shade:['0.2','red'],
                        cancel:function ss() {
                            $('#gaopoint').hide();
                            mp.removeOverlay(marker);
                        }



                    })
                    console.log("标记测试点");

                    var marker = new BMap.Marker(new BMap.Point(point.lng, point.lat));
                    // 添加点击事件
                    console.log(point.lng, point.lat);

                    document.getElementById('ss3').value = point.lng;
                    document.getElementById('ss4').value = point.lat;


                    marker.addEventListener('click', function() {

                        showPoint(point, marker);



                    });
                    // 添加坐标点到地图中


                    mp.addOverlay(marker);
                    marker.disableMassClear();





                    // 将坐标点添加到我们的坐标带你集合中
                    points.push(point);

                }
                if(12==model)  {
                    document.getElementById("zhong").value="";
                    layer.open({
                        type: 1,
                        area:['28%','85%'],
                        content: $('#zhongpoint') ,
                        title: ['中风险点位信息编辑', 'font-size:18px;'],
                        shade:['0.2','red'],
                        cancel:function ss() {
                            $('#zhongpoint').hide();
                            mp.removeOverlay(marker);
                        }



                    })
                    console.log("标记测试点");

                    var marker = new BMap.Marker(new BMap.Point(point.lng, point.lat));
                    // 添加点击事件
                    console.log(point.lng, point.lat);

                    document.getElementById('ss5').value = point.lng;
                    document.getElementById('ss6').value = point.lat;


                    marker.addEventListener('click', function() {

                        showPoint(point, marker);



                    });
                    // 添加坐标点到地图中


                    mp.addOverlay(marker);
                    marker.disableMassClear();





                    // 将坐标点添加到我们的坐标带你集合中
                    points.push(point);

                }
                if(13==model)  {
                    document.getElementById("di").value="";
                    layer.open({
                        type: 1,
                        area:['28%','85%'],
                        content: $('#dipoint') ,
                        title: ['低风险点位信息编辑', 'font-size:18px;'],
                        shade:['0.2','red'],
                        cancel:function ss() {
                            $('#dipoint').hide();
                            mp.removeOverlay(marker);
                        }



                    })
                    console.log("标记测试点");

                    var marker = new BMap.Marker(new BMap.Point(point.lng, point.lat));
                    // 添加点击事件
                    console.log(point.lng, point.lat);

                    document.getElementById('ss7').value = point.lng;
                    document.getElementById('ss8').value = point.lat;


                    marker.addEventListener('click', function() {

                        showPoint(point, marker);



                    });
                    // 添加坐标点到地图中


                    mp.addOverlay(marker);
                    marker.disableMassClear();





                    // 将坐标点添加到我们的坐标带你集合中
                    points.push(point);

                }
                // 标新点
                if(1 == model) {


                    document.getElementById("create_name1").value="";
                    document.getElementById("create_name2").value="";
                    document.getElementById("create_name3").value="";
                    document.getElementById("create_name4").value="";
                    // 创建新的坐标点
                    layer.open({
                        type: 1,
                        area:['28%','85%'],
                        content: $('#my_dialog') ,
                        title: ['任务点信息编辑', 'font-size:18px;'],
                        shade:['0.2','red'],
                        cancel:function ss() {
                            $('#my_dialog').hide();
                            mp.removeOverlay(marker);
                        }



                    })



                    console.log("标记测试点");

                    var marker = new BMap.Marker(new BMap.Point(point.lng, point.lat));
                    // 添加点击事件
                    console.log(point.lng, point.lat);

                    document.getElementById('ss1').value = point.lng;
                    document.getElementById('ss2').value = point.lat;


                    marker.addEventListener('click', function() {

                        showPoint(point, marker);



                    });



                    // 添加坐标点到地图中

                    if(fd==0)
                    {
                        mp.addOverlay(marker);
                        marker.disableMassClear();
                    }




                    // 将坐标点添加到我们的坐标带你集合中
                    points.push(point);

                }
            });
            function showPoly(pointList){

//循环显示点对象
                for(c=0;c<pointList.length;c++){
                    var marker = new BMap.Marker(pointList[c]);

//将途经点按顺序添加到地图上
                    var label = new BMap.Label(c+1,{offset:new BMap.Size(20,-10)});
                    marker.setLabel(label);
                }

                var  group = Math.floor( pointList.length /11 ) ;
                var mode = pointList.length %11 ;

                var driving = new BMap.DrivingRoute( mp, {onSearchComplete: function(results){
                        if (driving.getStatus() == BMAP_STATUS_SUCCESS){
                            var plan = driving.getResults().getPlan(0);
                            var  num = plan.getNumRoutes();
                            layer.msg("模拟点位数目 ："+num);
                            for(var j =0;j<num ;j++){
                                var pts= plan.getRoute(j).getPath();    //通过驾车实例，获得一系列点的数组
                                var polyline = new BMap.Polyline(pts);
                                mp.addOverlay(polyline);
                            }
                        }
                    }});
                for(var i =0;i<group;i++){
                    var waypoints = pointList.slice(i*11+1,(i+1)*11);
                    //注意这里的终点如果是11的倍数的时候，数组可是取不到最后一位的，所以要注意终点-1喔。感谢song141的提醒，怪我太粗心大意了~
                    driving.search(pointList[i*11], pointList[(i+1)*11-1],{waypoints:waypoints});//waypoints表示途经点
                }
                if( mode != 0){
                    var waypoints = pointList.slice(group*11,pointList.length-1);//多出的一段单独进行search
                    driving.search(pointList[group*11],pointList[pointList.length-1],{waypoints:waypoints});
                }

            }

            function begins(){
                layer.msg("可查看该种方式下的路线所需时间，对人员进行派遣");
                //显示轨迹
                showPoly(myp);
            }
            function addinitpoint(point)
            {

                var marker = new BMap.Marker(new BMap.Point(point.lng, point.lat));


                marker.addEventListener('click', function() {

                    showPoint(point, marker);



                });

                mp.addOverlay(marker);
                marker.disableMassClear();
                // 将坐标点添加到我们的坐标带你集合中
                points.push(point);
            }


            function inits()
            {


                $.ajax({

                    url:"http://localhost:8080/api/taskpoint/selectAll",

                    method: 'GET',
                    contentType: 'application/json',
                    dataType: "json",
                    crossDomain:true,
                    success:function(res) {

                        if(res.code == 200) {

                            layer.msg("初始化成功");

                            //alert(res.data);

                            // alert(JSON.stringify(res.data));

                            var obj = JSON.parse(JSON.stringify(res.data));

                            //alert(obj.length);

                            //alert(obj[0].taskLatitudeX);

                            for(var i=0;i<obj.length;i++)
                            {

                                //     const marker = new BMap.Marker(new BMap.Point(obj[i].taskLatitudeX, obj[i].taskLongitudeY));
                                //     showPoint(point, marker);
                                //     mp.addOverlay(marker);


                                var pointss= new BMap.Point(obj[i].taskLongitudeY,obj[i].taskLatitudeX ); //将标注点转化成地图上的点
                                addinitpoint(pointss);








                            }



                        }else{
                            layer.msg("初始化失败");
                        }

                    },

                });


            }
            function exit(){
                myp=[];
                flagx=1;
                document.getElementById('controller').style.display='none';//显示控件按钮
                mp.clearOverlays();
                reset();
                flag2=0;//退出标志
                flag=1;
            }
            // 坐标点的点击事件监听
            var lngs,lats;
            function showPoint(point, marker) {
                // 查看点
                // 创建信息窗口
                var opts = {
                    width: 280,
                    height: 260 ,


                    title: '任务点信息'
                };

                if(0 == model) {

                    var lng = point.lng;
                    var lat =point.lat;

                    var t1,t2,t3,t4,t5;

                    $.ajax({
                        async:false,
                        url:"http://localhost:8080/api/taskpoint/selectAll",

                        method: 'GET',
                        contentType: 'application/json',
                        dataType: "json",
                        crossDomain:true,

                        success:function test(res) {

                            if(res.code == 200) {
                                var obj = JSON.parse(JSON.stringify(res.data));

                                for(var i=0;i<obj.length;i++) {

                                    if(point.lng==obj[i].taskLongitudeY&&point.lat==obj[i].taskLatitudeX)
                                    {

                                        t1=obj[i].taskName;
                                        t2=obj[i].taskType;
                                        t3=obj[i].taskAddress;
                                        t4=obj[i].taskInfo;
                                        t5=obj[i].frequency;
                                    }


                                }

                            }


                            else{
                                layer.msg("参数获取失败");
                            }

                        },

                    });
                    lngs=lng;
                    lats=lat;
                    var infoWindow = new BMap.InfoWindow(`<div style='word-break:break-all;overflow-y:scroll;overflow-x:hidden;height: 220px;'>`+`<br>`+'经纬度'+lng+','+lat+`<br>`+`<br>`+'任务名称:'+t1+`<br>`+'任务类型:'+t2+`<br>`+'任务地址:'+`<br>`+t3+`<br>`+'任务信息:'+`<br>`+t4+`<br>`+'打卡频次:'+t5+`<br>`+`<button style='background-color: #00FF00; margin-top: 20px;margin-left:100px;' onclick="opens(lngs,lats)">编辑信息</button>`+`</div>`, opts);


                    // console.log("查看测试");
                    // alert('经度：' + lng + '，纬度：' + lat);
                    mp.openInfoWindow(infoWindow, point); // 开启信息窗口
                }

                // 删除点
                if(2 == model) {
                    var flag3;

                    $.ajax({
                        async:false,
                        url:"http://localhost:8080/api/taskpoint/selectAll",

                        method: 'GET',
                        contentType: 'application/json',
                        dataType: "json",
                        crossDomain:true,

                        success:function test(res) {

                            if(res.code == 200) {
                                var obj = JSON.parse(JSON.stringify(res.data));
                                for(var i=0;i<obj.length;i++) {

                                    if(point.lng==obj[i].taskLongitudeY&&point.lat==obj[i].taskLatitudeX)
                                    {

                                        flag3=obj[i].taskId;

                                    }


                                }

                            }


                            else{
                                layer.msg("参数获取失败");
                            }

                        },

                    });


                    $.ajax({

                        url:"http://localhost:8080/api/taskpoint/" + flag3,

                        method: 'DELETE',
                        contentType: 'application/json',
                        dataType: "json",
                        crossDomain:true,
                        success:function(res) {

                            if(res.code == 200) {

                                layer.msg("删除点位成功");

                            }else{
                                layer.msg("删除点位成失败");

                            }

                        },

                    });
                    mp.removeOverlay(marker);

                }
            }

            // 区域坐标点范围
            var overlays = [];
            // 区域划分后触发事件
            var overlaycomplete = function(e) {
                var position = [];
                overlays.push(e.overlay);
                // 获取多边形端点坐标
                for(var i = 0; i < e.overlay.getPath().length; i++) {
                    let coordinate = new Object();
                    coordinate.lng = e.overlay.getPath()[i].lng;
                    coordinate.lat = e.overlay.getPath()[i].lat;
                    position.push(coordinate);
                }
                // 清空上一区域内的点
                areaPoint.length = 0;
                // 重新添加区域内的点
                points.forEach(v => {
                    // 计算点是否在区域内
                    if(isInsidePolygon(v, position)) {
                        areaPoint.push(v)
                    }
                })
                // 关闭绘制模式
                drawingManager.close();
            };

            // 绘制样式
            var styleOptions = {
                strokeColor: "red", //边线颜色。
                fillColor: "red", //填充颜色。当参数为空时，圆形将没有填充效果。
                strokeWeight: 3, //边线的宽度，以像素为单位。
                strokeOpacity: 0.8, //边线透明度，取值范围0 - 1。
                fillOpacity: 0.6, //填充的透明度，取值范围0 - 1。
                strokeStyle: 'solid' //边线的样式，solid或dashed。
            };

            // 实例化鼠标绘制工具
            var drawingManager = new BMapLib.DrawingManager(mp, {
                // 是否开启绘制模式
                isOpen: false,
                // 是否显示工具栏
                enableDrawingTool: true,
                drawingToolOptions: {
                    // 位置
                    anchor: BMAP_ANCHOR_TOP_RIGHT,
                    // 偏离值
                    offset: new BMap.Size(5, 5),
                    // 画覆盖物工具栏上显示的可选项
                    drawingModes: [
                        BMAP_DRAWING_MARKER,
                        BMAP_DRAWING_CIRCLE,
                        BMAP_DRAWING_POLYLINE,
                        BMAP_DRAWING_POLYGON,
                        BMAP_DRAWING_RECTANGLE
                    ]
                },
                // 圆的样式
                circleOptions: styleOptions,
                // 线的样式
                polylineOptions: styleOptions,
                // 多边形的样式
                polygonOptions: styleOptions,
                // 矩形的样式
                rectangleOptions: styleOptions
            });

            // 添加鼠标绘制工具监听事件，用于获取绘制结果
            drawingManager.addEventListener('overlaycomplete', overlaycomplete);

            /// 清除区域
            function clearAll() {
                for(var i = 0; i < overlays.length; i++) {
                    mp.removeOverlay(overlays[i]);
                }
                // 区域坐标置空
                overlays.length = 0
            }

            function addpoint() {



                var fields = $('#my_dialog').serializeArray();
                var obj = {}; //声明一个对象
                $.each(fields, function(index, field) {
                    obj[field.name] = field.value; //通过变量，将属性值，属性一起放到对象中
                })

                $.ajax({
                    url:" http://localhost:8080/api/taskpoint/insertPoint",
                    data:JSON.stringify(obj),
                    method: 'POST',
                    contentType: 'application/json',
                    dataType: "json",
                    crossDomain:true,
                    success:function(res) {

                        if(res.code == 200) {

                            layer.closeAll();

                            $('#my_dialog').hide();
                            layer.msg("保存成功");
                        }

                        else{
                            layer.msg("保存失败");

                        }

                    }




                })
                var g1=document.getElementById("create_name1").value;
                var g2=document.getElementById("create_name2").value;
                var g3=document.getElementById("create_name3").value;
                var g4=document.getElementById("create_name4").value;
                var g5=$("#create_type1").val();




            }


            //打开窗口
            function opens(lng,lat){

                document.getElementById("st1").value=lng;
                document.getElementById("st2").value=lat;
                document.getElementById("create_name1").value="";
                document.getElementById("create_name2").value="";
                document.getElementById("create_name3").value="";
                document.getElementById("create_name4").value="";
                layer.open({
                    type: 1,
                    area:['28%','95%'],
                    content: $('#my_dialog2') ,
                    title: ['任务点信息编辑', 'font-size:18px;'],
                    shade:['0.2','red'],
                    cancel:function ss() {
                        $('#my_dialog2').hide();

                    }



                })

                var flag4;
                var lngss=document.getElementById("st1").value;
                var latss=document.getElementById("st2").value;
                $.ajax({
                    async:false,
                    url:"http://localhost:8080/api/taskpoint/selectAll",

                    method: 'GET',
                    contentType: 'application/json',
                    dataType: "json",
                    crossDomain:true,

                    success:function test(res) {

                        if(res.code == 200) {
                            var obj = JSON.parse(JSON.stringify(res.data));
                            for(var i=0;i<obj.length;i++) {

                                if(lngss==obj[i].taskLongitudeY&&latss==obj[i].taskLatitudeX)
                                {

                                    flag4=obj[i].taskId;

                                }


                            }

                        }


                        else{
                            layer.msg("参数获取失败");
                        }

                    },

                });
                document.getElementById("taskid").value=flag4;

            }

            function changepoint(){


                var fields = $('#my_dialog2').serializeArray();
                var obj = {}; //声明一个对象

                $.each(fields, function(index, field) {
                    obj[field.name] = field.value; //通过变量，将属性值，属性一起放到对象中
                })






                $.ajax({
                    url:"http://localhost:8080/api/taskpoint/updatePoint",

                    data:JSON.stringify(obj),
                    method: 'POST',
                    contentType: 'application/json',
                    dataType: "json",
                    crossDomain:true,
                    success:function(res) {

                        if(res.code == 200) {

                            layer.closeAll();

                            $('#my_dialog2').hide();
                            layer.msg("保存成功");
                        }

                        else{
                            layer.msg("保存失败");

                        }

                    }




                })
                var g1=document.getElementById("create_name1").value;
                var g2=document.getElementById("create_name2").value;
                var g3=document.getElementById("create_name3").value;
                var g4=document.getElementById("create_name4").value;
                var g5=$("#create_type1").val();


            }

            function text(){
                layer.open({
                    type: 1,
                    area:['28%','85%'],
                    content: $('#person') ,
                    title: ['巡更人员派遣', 'font-size:18px;'],
                    shade:['0.2','red'],
                    cancel:function ss() {
                        $('#person').hide();

                    }
                })

            }

            function backs(){
                document.getElementById('begins').disabled=false;
                document.getElementById('xx').style.display='none';
                document.getElementById('plarou').style.display='block';//显示控件按钮
                document.getElementById('controller').style.display='none';
                document.getElementById('choicepoint').style.display='none';

                document.getElementById('setpoint').className='pp';

            }
            function choosepoint(){
                flag=1;
                document.getElementById('setpoint').className='layui-btn';

                document.getElementById('choicepoint').style.display='block';
                document.getElementById('xx').style.display='none';
                document.getElementById('controller').style.display='none';
                document.getElementById("danger").style.display='none';
                document.getElementById('plarou').style.display='none';
                layer.msg("请选择点位标记");


            }



            // 计算点是否在坐标内
            function isInsidePolygon(point, pts) {
                const N = pts.length
                let intersectCount = 0
                let precision = 2e-10
                // 邻界顶点
                let p1, p2
                let p = point
                // 左顶点
                p1 = pts[0]
                // 检查所有射线
                for(let i = 1; i <= N; ++i) {
                    // p是一个边上的点
                    if(p.lat === p1.lat && p.lng === p1.lng){
                        return true
                    }
                    // 右顶点
                    p2 = pts[i % N]
                    // 射线与我们无关
                    if(p.lat < Math.min(p1.lat, p2.lat) || p.lat > Math.max(p1.lat, p2.lat)) {
                        p1 = p2;
                        // 下一个射线左点
                        continue;
                    }
                    if(p.lat > Math.min(p1.lat, p2.lat) && p.lat < Math.max(p1.lat, p2.lat)) {
                        if(p.lng <= Math.max(p1.lng, p2.lng)) {
                            if(p1.lat === p2.lat && p.lng >= Math.min(p1.lng, p2.lng))
                                return true

                            if(p1.lng === p2.lng) {
                                if(p1.lng === p.lng) {
                                    return true
                                } else {
                                    ++intersectCount
                                }
                            } else {
                                let xInters = (p.lat - p1.lat) * (p2.lng - p1.lng) / (p2.lat - p1.lat) + p1.lng;
                                if(Math.abs(p.lng - xInters) < precision)
                                    return true

                                if(p.lng < xInters)
                                    ++intersectCount
                            }
                        }
                    } else {
                        if(p.lat === p2.lat && p.lng <= p2.lng) {
                            // 下一个顶点
                            let p3 = pts[(i + 1) % N];
                            if(p.lat >= Math.min(p1.lat, p3.lat) && p.lat <= Math.max(p1.lat, p3.lat))
                                ++intersectCount
                            else
                                intersectCount += 2
                        }
                    }
                    // 下一个射线左点
                    p1 = p2
                }
                // 偶数在多边形外, 奇数在多边形内
                return 0 !== intersectCount % 2
            }

            // 添加带有定位的导航控件
            var navigationControl = new BMap.NavigationControl({
                // 靠左上角位置
                anchor: BMAP_ANCHOR_TOP_LEFT,
                // LARGE类型
                type: BMAP_NAVIGATION_CONTROL_LARGE,
                // 启用显示定位
                enableGeolocation: true // 会多出一个点
            });
            mp.addControl(navigationControl);
            // 添加定位控件
            var geolocationControl = new BMap.GeolocationControl();
            geolocationControl.addEventListener("locationSuccess", function(e){
                // 定位成功事件
                var address = '';
                address += e.addressComponent.province;
                address += e.addressComponent.city;
                address += e.addressComponent.district;
                address += e.addressComponent.street;
                address += e.addressComponent.streetNumber;
                alert("当前定位地址为：" + address);
            });
            geolocationControl.addEventListener("locationError",function(e){
                // 定位失败事件
                alert(e.message);
            });
            mp.addControl(geolocationControl);







        </script>
    </div>
</content>



</body>